import request from './index.js'

//获取全部博客数据
export const getBlogData = (id,num,size) => request({url:`/blog?blog=${id}&pageNum=${num}&pageSize=${size}`})

//获取博客详情数据
export const getBlogDetailData = (blog_id,user_id) => request({url:`/blog?blog=${blog_id}&user_id=${user_id}`})

//博客点赞和取消
export const changeBlogZan = (type,data) => request({url:`/remark?remark=${type}`,method:'POST',data:data})

//博客收藏的状态
export const changeBlogCollect = (type,data) => request({url:`/collect?collect=${type}`,method:'POST',data:data})

//添加博客评论
export const addBlogComment = (data) => request({url:'/comment',method:'POST',data:data})

//获取博客评论列表
export const getBlogCommentList = (id,num,size) => request({url:`/comment?blog_id=${id}&pageNum=${num}&pageSize=${size}`})

//关键字搜索内容
export const searchBlogData = (keyword,num,size) => request({url:`/searchBlog?keyword=${keyword}&pageNum=${num}&pageSize=${size}`})